<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>基本设置-公司资料</title>
    <link rel="stylesheet" href="/css/normalize.css">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/css/user_index.css?4">
</head>
<body>
<!-- 头部导航 -->
<nav class="common_header">
    <div class="container">
        <a class="logo" href="/">
            <img src="/images/logo.png" alt="Logo">
        </a>
        <ul class="lt_nav">
            <li>
                <a href="#">桌面</a>
            </li>
            <li>
                <a href="#">客户管理</a>
                <ul class="has-dropdown">
                    <li><a href="#">所有客户</a></li>
                    <li><a href="#">共享客户</a></li>
                    <li><a href="#">客户开发</a></li>
                </ul>
            </li>
            <li>
                <a href="#">渠道管理</a>
                <ul class="has-dropdown">
                    <li><a href="#">所有渠道</a></li>
                    <li><a href="#">兼职渠道</a></li>
                    <li><a href="#">招聘渠道</a></li>
                </ul>
            </li>
            <li>
                <a href="#">职位管理</a>
                <ul class="has-dropdown">
                    <li><a href="#">我的职位</a></li>
                    <li><a href="#">所有职位</a></li>
                </ul>
            </li>
            <li>
                <a href="/user/resume">简历管理</a>
                <ul class="has-dropdown">
                    <li><a href="/user/resume">我的简历</a></li>
                    <li><a href="/user/resume/all">公司简历池</a></li>
                </ul>
            </li>
            <li>
                <a href="/user/data-report">数据报表</a>
                <ul class="has-dropdown">
                    <li><a href="/user/data-report">推荐数据</a></li>
                    <li><a href="/user/data-report/finance">财务数据</a></li>
                    <li><a href="/user/data-report/ranking">排行榜</a></li>
                </ul>
            </li>
            <li>
                <a href="#">人事管理</a>
                <ul class="has-dropdown">
                    <li><a href="#">人员信息</a></li>
                    <li><a href="#">薪酬管理</a></li>
                    <li><a href="#">公告管理</a></li>
                    <li><a href="#">知识分享</a></li>
                </ul>
            </li>
            <li class="active">
                <a href="#">设置</a>
                <ul class="has-dropdown">
                    <li><a href="/user/set/index">基本设置</a></li>
                    <li><a href="/user/set/job-level">部门设置</a></li>
                    <li><a href="javascript:;">字典配置</a></li>
                </ul>
            </li>
        </ul>
        <ul class="rt_nav">
            <li>
                <a class="user_avatar" href="#"><img src="/images/logo.png" alt="用户头像"></a>
            </li>
            <li>
                <a class="user_tubiao" href="#"><i class="icon icon-tubiao"></i></a>
            </li>
        </ul>
    </div>
</nav>
<!--  content  -->
<main class="common_content">
    <div class="container">
        <div class="ct_main">
            <div class="ct_left w170">
                <h2 class="nav-title"><i class="icon"></i>设置</h2>
                <ul class="layui-nav layui-nav-tree tab-nav1" id="tab-nav2" lay-filter="test">
                    <li class="layui-nav-item layui-nav-itemed active">
                        <a href="javascript:;">基本设置</a>
                        <dl class="layui-nav-child">
                            <dd><a href="/user/set/company-info">公司资料</a></dd>
                            <dd><a href="/user/set/organization">公司组织架构</a></dd>
                            <dd><a href="/user/set/mac">指定MAC信息登录</a></dd>
                            <dd><a href="/user/set/download">猎头下载资源设置</a></dd>
                            <dd><a href="/user/set/login-list">登录日志</a></dd>
                            <dd><a href="/user/set/protection">保护期设置</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">部门设置</a>
                        <dl class="layui-nav-child">
                            <dd><a href="/user/set/job-level">职级权限对应说明</a></dd>
                            <dd><a href="/user/set/permission">员工权限</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">字典配置</a>
                    </li>
                </ul>
            </div>
            <ul class="nav-items1 nav-items2 w999" id="tab-content2">
                <!--基本设置-->
                <li class="basic-sets active">
                    <div class="selector-head">
                        <h2>基本设置</h2>
                    </div>
                    <!--公司资料-->
                    <ul class="basic-sets-ul">
                        <li>
                            <h2 class="basic-title">
                                公司资料
                                <div class="rt">
                                    <a href="#" title="保存"><i class="icon icon-save-green"></i></a>
                                    <a href="#" title="编辑"><i class="icon icon-edit-green"></i></a>
                                </div>
                            </h2>
                            <form class="layui-form company-info" action="">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">公司名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入公司名称" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">公司LOGO</label>
                                    <div class="layui-upload">
                                        <button type="button" class="layui-btn" id="test1">上传LOGO</button>
                                        <div class="layui-upload-list">
                                            <img class="layui-upload-img" id="demo1">
                                            <p id="demoText"></p>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </li>
                    </ul>
                </li>
                <!--部门设置-->
                <li class="basic-sets">
                    <div class="selector-head">
                        <h2>部门设置</h2>
                    </div>
                    <div class="layui-tab">
                        <ul class="layui-tab-title">
                            <li class="layui-this">职级权限对应说明</li>
                            <li>员工权限</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--职级权限对应说明-->
                            <ul class="layui-tab-item layui-show basic-sets-ul">
                                <li>
                                    <h2 class="basic-title">
                                        职级权限对应说明
                                    </h2>
                                    <div class="layui-form">
                                        <table class="layui-table">
                                            <thead>
                                            <tr>
                                                <th>职级对应权限</th>
                                                <th>超级管理员</th>
                                                <th>管理员</th>
                                                <th>员工用户</th>
                                                <th>外部资源</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr>
                                                <td>Manager</td>
                                                <td>√</td>
                                                <td>×</td>
                                                <td>×</td>
                                                <td>×</td>
                                            </tr>
                                            <tr>
                                                <td>主管/leader</td>
                                                <td>×</td>
                                                <td>√</td>
                                                <td>×</td>
                                                <td>×</td>
                                            </tr>
                                            <tr>
                                                <td>员工</td>
                                                <td>×</td>
                                                <td>×</td>
                                                <td>√</td>
                                                <td>×</td>
                                            </tr>
                                            <tr>
                                                <td>外部资源</td>
                                                <td>×</td>
                                                <td>×</td>
                                                <td>×</td>
                                                <td>√</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </li>
                            </ul>
                            <!--员工权限-->
                            <ul class="layui-tab-item basic-sets-ul">
                                <li>
                                    <h2 class="basic-title">
                                        员工权限
                                        <a href="#" class="rt" title="添加" onclick="addEmptr()"><i class="icon icon-addNew"></i></a>
                                    </h2>
                                    <div class="layui-form">
                                        <table class="layui-table" id="emp_table">
                                            <thead>
                                            <tr>
                                                <th>编号</th>
                                                <th>登录名</th>
                                                <th>姓名</th>
                                                <th>顾问等级</th>
                                                <th>所属部门</th>
                                                <th>账号状态</th>
                                                <th>创建时间</th>
                                                <th>操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr>
                                                <td>1</td>
                                                <td>猎头顾问</td>
                                                <td>Wendy</td>
                                                <td>高级顾问</td>
                                                <td>优伯国际</td>
                                                <td>正常</td>
                                                <td>2018-08-30 16:30:25</td>
                                                <td>
                                                    <input type="button" class="check-btn" value="编辑">
                                                    <input type="button" class="check-btn" value="删除" onclick="deletetr(this)">
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <!--字典配置-->
                <li class="basic-sets">
                    <div class="selector-head">
                        <h2>字典配置</h2>
                    </div>
                    <h3 style="text-align: center; line-height: 100px;">暂无内容</h3>
                </li>
            </ul>
        </div>
    </div>
</main>



<script src="/js/jquery.min.js"></script>
<script src="/lib/layui/layui.js"></script>
<script src="/js/LayuiFunction.js"></script>
<script>
    layui.use(['table','form', 'layer', 'upload','element'], function(){
        var form = layui.form
            ,table = layui.table
            ,layer = layui.layer
            ,upload = layui.upload
            ,element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

        //LOGO上传
        var uploadInst = upload.render({
            elem: '#test1'
            ,url: '/upload/'
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo1').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                if(res.code > 0){
                    return layer.msg('上传失败');
                }
                //上传成功
            }
            ,error: function(){
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function(){
                    uploadInst.upload();
                });
            }
        });

        //

    });
</script>
<script>
    /***** tab切换 JS *****/
//    $("#tab-nav2").on("click","li", function (e) {
//        e.preventDefault();
//        let idx = $(this).index();
//        $(this).siblings().removeClass("active");
//        $(this).addClass("active");
//        $(this).parents(".ct_main").find("#tab-content2>li").eq(idx).siblings().removeClass("active");
//        $(this).parents(".ct_main").find("#tab-content2>li").eq(idx).addClass("active");
//    });
    //删除行tr
    var row = 0;
    function deletetr(tdobject){
        row--;
        var td=$(tdobject);
        td.parents("tr").remove();
    }


</script>


</body>
</html>